package com.len.service.impl;

import com.len.base.BaseMapper;
import com.len.base.impl.BaseServiceImpl;
import com.len.entity.Channel;
import com.len.mapper.ChannelMapper;
import com.len.service.ChannelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author songxiangyang
 * @date 2019/03/15.
 */
@Service
public class ChannelServiceImpl extends BaseServiceImpl<Channel,String> implements ChannelService {

  @Autowired
  private ChannelMapper channelMapper;

  @Override
  public BaseMapper<Channel, String> getMappser() {
    return channelMapper;
  }

  @Override
  public int deleteByPrimaryKey(String id) {
    return channelMapper.deleteByPrimaryKey(id);
  }

  @Override
  public int insert(Channel record) {
    record=super.addValue(record,true);
    return channelMapper.insert(record);
  }
  
  @Override
  public Channel selectByPrimaryKey(String id) {
    return channelMapper.selectByPrimaryKey(id);
  }

  @Override
  public int updateByPrimaryKeySelective(Channel record) {
    return channelMapper.updateByPrimaryKeySelective(record);
  }

  @Override
  public int updateByPrimaryKey(Channel record) {
    return channelMapper.updateByPrimaryKey(record);
  }

  @Override
  public List<Channel> selectListByPage(Channel channel) {
    return channelMapper.selectListByPage(channel);
  }
}
